#include <iostream>
#include <cctype>
using namespace std;
int main()
{
	string str, tmp = "", ret = "";
	cin >> str;
	for (int i = 0; i <= str.size(); ++i)
	{
		if (isdigit(str[i]))
		{
			tmp += str[i];
		}
		else
		{
			if (tmp.size() > ret.size())
			{
				ret = tmp;
			}
			tmp = "";
		}
	}
	cout << ret;
	return 0;
}